tic
    clear all
    g=gpuDevice;
   

 
A=single(randn(5000,5000));
B=single(randn(5000,5000));
D=single(randn(5000,1));
GA = gpuArray(A);
GB = gpuArray(B);
GD=gpuArray(D);
GC=GA*GB*GD;
v=sum(GC);
C=gather(v);
wait(g)
toc

